package com.example.lombok;

import lombok.ToString;

import java.util.Date;

/**
 * @author shanchong
 * @date 2019-06-23
 **/
@ToString(exclude = {"name"})
public class ToStringDemo {

    private String name;

    private String password;

    private Date createDate;

    private Integer status;

    /**
     * @ToString：用在类上，可以自动覆写toString方法，当然还可以加其他参数，例如@ToString(exclude=”id”)排除id属性，或者@ToString(callSuper=true, includeFieldNames=true)调用父类的toString方法，包含所有属性
     * @param args
     */
    public static void main(String[] args) {
        ToStringDemo toStringDemo = new ToStringDemo();
        System.out.println(toStringDemo);
    }


}
